package com.minhua.jijiehao2.mainframe.account.addaccountactivity.impl

import com.minhua.jijiehao2.bean.BaseBean
import com.minhua.jijiehao2.http.*
import com.minhua.jijiehao2.mainframe.account.addaccountactivity.imp.IAddAccountModel

class AddAccountModel : IAddAccountModel {
    override fun addAccount(map: ParamsMap, callBack: CallBack<Any>) {
        HttpController<Any>().doHttp(
                ApiClient.getInstance().api.addAccount(map.toRequestBody()),
                object : BaseSubscriber<Any>() {
                    override fun dealData(t: BaseBean<Any>) {
                        super.dealData(t)
                        callBack.onSuccess(t)
                    }
                }
        )
    }
}